#include "StdAfx.h"

void ROC::Initialize(vector<Quotation> stockQuotations)
{
	int i;
	for(i = 0; i< this->_period ; i++)
		this->_values.push_back(EMPTY);

	while(i <(int)stockQuotations.size())
	{
		this->_values.push_back( 100*((stockQuotations[i].Prices[this->_price] / stockQuotations[i-this->_period].Prices[this->_price]) - 1) );
		i++;
	}
}